package unit2.part5;

public class OutputTest {
    public static void main(String[] args) {
        System.out.println("直接输出");

        System.out.printf("格式化输出,%d,\n", 1);
        System.out.printf("格式化输出,%10d,\n", 1);
        System.out.printf("格式化输出,%10d,\n", 10);
        System.out.printf("格式化输出,%10d,\n", 100);
        System.out.printf("格式化输出,%-10d,\n", 1);
        System.out.printf("格式化输出,%-10d,\n", 10);
        System.out.printf("格式化输出,%-10d,\n", 100);

        System.out.printf("格式化输出,%10.2f,\n", 123.456);
        System.out.printf("格式化输出,%f,\n", 123.456);

        System.out.println((char)89);
        System.out.println('a');
    }
}
